<tagLib name="html" />
<include file="Public:top" />
<style>
input{margin-bottom:10p;}
tr{ height:34px;}
</style>
<script>
/*jQuery(function(){
	$('#cc').combobox({
		url:'__URL__/showSchoolList',width:150,
		valueField:'id',
		textField:'sName',
		onSelect:function(record){  
            $('#dwid').val(record.id);   
			$('#dwmc').val(record.sName);         
        }  
	});
})*/
var editor;
KindEditor.ready(function(K) {
	editor = K.create('textarea[name="remarks"]', {
		width:'600px',height:'300px',allowFileManager:true,
		items : [
			'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
			'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
			'insertunorderedlist', '|', 'emoticons', 'image', 'link','flash','media','insertfile','map']
	});
	var myDate  = new Date();
	var yy		= myDate.getFullYear(); 
	$('#zjnd').val(yy+'');
});
function save(){
	$('#remarks').val(editor.html());
	//sendForm('form1','__URL__/insert/')	
	$.post("__URL__/insert/",$('#form1').serialize(),function(data){
		$.messager.show({title:'提示信息',msg:data.info,timeout:2000,showType:'slide'});
	}//function
	,"json");//post	
}
</script>
<div id="main" class="" >
<div class="content">
<div class="title">新增小额工程 [ <a href="__URL__">返回列表</a> ]</div>
<form method='post' id="form1" action="__URL__/insert/" >
<table cellpadding=3 cellspacing=3>
<tr>
  <td class="tRight" >项目名称：</td>
  <td class="tLeft" ><input type="text" class="medium bLeft" name="xmmc" value="" /></td>
	<td width="442" class="tLeft" >备注</td>
</tr>
<tr>
  <td class="tRight" >单位名称：</td>
  <td class="tLeft" >
      	<!--<select id="cc" class="easyui-combobox" name="dwmc1"></select>--><input type="text" class="medium bLeft" id="ccc" name="ccc" value="" />
        <input name="dwmc" id="dwmc" type="hidden" value="{$vo.dwmc}" />
        <input name="dwid" id="dwid" type="hidden" value="{$vo.dwid}" />
      </td>
	<td width="442" rowspan="9" valign="top" class="tLeft" ><textarea class=""  name="remarks" rows="5" cols="57" id="remarks"></textarea></td>
</tr>
<tr>
	<td class="tRight">资金来源：</td>
	<td class="tLeft"><SELECT class="medium bLeft"  name="zjly" title="计划表示财政预算内资金，自筹表示未纳入财政预算的单位自筹资金">
    <option value=""></option>
	<option value="计划">计划</option>
	<option value="自筹">自筹</option>
	</SELECT></td>
	</tr>
<tr>
	<td class="tRight" >资金年度：</td>
	<td class="tLeft" ><SELECT class="medium bLeft"  name="zjnd" id="zjnd" title="该资金的使用年度，以财政预算为准，自筹的以报批时间为准，一般不允许跨年度结算">
    <option value="2007">2007</option><option value="2008">2008</option><option value="2009">2009</option>
	<option value="2010">2010</option><option value="2011">2011</option><option value="2012">2012</option>
    <option value="2013">2013</option><option value="2014">2014</option><option value="2015">2015</option>
    <option value="2016">2016</option><option value="2017">2017</option><option value="2018">2018</option>
    <option value="2019">2019</option><option value="2020">2020</option><option value="2021">2021</option>
    <option value="2022">2022</option><option value="2023">2023</option><option value="2024">2024</option>
    <option value="2025">2025</option><option value="2026">2026</option><option value="2027">2027</option>
    <option value="2028">2028</option><option value="2029">2029</option><option value="2030">2030</option>
	</SELECT></td>
	</tr>
<tr>
	<td class="tRight" >实施时间：</td>
	<td class="tLeft" ><input type="text" id="sssj" name="sssj" class="easyui-datebox medium bLeft" value="" title="以工程竣工时间为准" width="150"/></input></td>
	</tr>
<tr>
	<td class="tRight" >预算金额：</td>
	<td class="tLeft" ><input type="text" class="medium bLeft"  name="ys" value="" />
万元</td>
	</tr>
<tr>
  <td class="tRight" >中标价格：</td>
  <td class="tLeft" ><input type="text" class="medium bLeft"  name="zbjg" value="" />
    万元</td>
	</tr>
<tr>
  <td class="tRight" >中标单位：</td>
  <td class="tLeft" ><input type="text" class="medium bLeft"  name="zbdw" value="" /></td>
	<tr>
	  <td class="tRight" >&nbsp;</td>
	  <td class="tLeft" >&nbsp;</td>
	</tr>
<tr>
	<td class="tRight tTop">&nbsp;</td>
	<td class="tLeft">&nbsp;</td>
	</tr>
<!--<tr>
	<td class="tRight">状态：</td>
	<td class="tLeft"><SELECT class="small bLeft"  name="status">
	<option value="1">启用</option>
	<option value="0">禁用</option>
	</SELECT></td>
	<td class="tLeft">&nbsp;</td>
</tr>-->
<tr>
	<td></td>
	<td class="center"><input type="hidden" name="ajax" value="1">
	<input type="button" value="保 存" onclick="save()" class="small submit">
	<input type="reset" class="submit  small" value="清 空" ></td>
	<td class="center">&nbsp;</td>
</tr>
</table>
</form>
</div>
</div>
<include file="Public:footer" />
<div id="popSchool" class="hide">
<ul id="tList"><li>公办中学</li><li>公办小学</li><li>公办幼儿园</li><li>局直属单位</li></ul>
<ul id="sList"></ul>
</div>
<script>
	$.post("__URL__/showSchoolList/",0,function(data){
			for(i=0;i<data.length;i++){
				$('#sList').append("<li sID="+ data[i]['id'] +" sType="+ data[i]['sType'] +">"+data[i]['sName'].substring()+"</li>")
			}//for	
			$('#sList li').addClass("hand").hover(function(){
			  $(this).addClass("bg_green");
			},function () {
			  $(this).removeClass("bg_green");
			})//hover
			$('#sList li').click(function(){
				sType 	= $(this).attr("sType");
				sID		= $(this).attr("sID");
				sName	= $(this).text();
				$('#dwid').val(sID);   
				$('#dwmc').val(sName); 
				$('#ccc').val(sName); 
			}).hide()//click
		}//function
	,"json");//post	
		
	$('#ccc').popDiv({"targetDiv" : "popSchool"});
	$('#popSchool li').addClass("hand").hover(function(){
			$(this).addClass("bg_green");
		  },function () {
			$(this).removeClass("bg_green");
	}).click(function(){
		$('#sList li').hide();
		$("#sList li[sType='"+$(this).html()+"']").show();
	})//click
</script>